﻿using System.ComponentModel;
using System.Windows.Forms;

namespace docNET.Controls
{
	/// <summary>
	/// Represents an Windows DnCheckBox control.
	/// </summary>
	public partial class DnCheckBox : CheckBox
	{
		/// <summary>
		/// Initializes a new instance of the control.
		/// </summary>
		public DnCheckBox()
		{
			InitializeComponent();
		}

		/// <summary>
		/// Initializes a new instance of the control.
		/// </summary>
		/// <param name="container">Container to add the control to.</param>
		public DnCheckBox(IContainer container)
		{
			container.Add(this);

			InitializeComponent();
		}

		/// <summary>
		/// Gets or sets the original value for the control.
		/// </summary>
		public bool OriginalValue { get; set; }

		/// <summary>
		/// Checks whether checked has changed or not.
		/// </summary>
		public bool IsChanged { get { return Checked != OriginalValue; } }
	}
}
